//Name:
//Purpose:
//Author: wjy
//Date: 2022-01-25 16:11:53
//From:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    int temp = 1;
    float e = 1.0f;
    float num;
    printf("Enter a min num: ");
    scanf("%f", &num);
    for (int i = 1;; i++)
    {
        temp = temp * i;
        if (1.0f / temp < num)
        {
            break;
        }
        else
        {
            e = e + 1.0f / temp;
        }
    }
    printf("%f\n", e);
    system("pause");
    return 0;
}